<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <script>
        let arr = [
            {
                id: 1,
                name: '张三',
                age: 21,
                workInfo: {
                    addr: '北京市XXXXX',
                    salary: 10000,
                    year: 2
                }
            },
            {
                id: 2,
                name: '李四',
                age: 31,
                workInfo: {
                    addr: '上海市XXXXX',
                    salary: 200000,
                    year: 3
                }
            }
        ]
       const targetArr=arr.filter(item=>item.age>11)
        console.log('targetArr:',targetArr)
    </script>
</body>
</html>
